.class Lcom/waiqin365/lightapp/im/activity/t;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/text/TextWatcher;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public afterTextChanged(Landroid/text/Editable;)V
    .locals 4

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->e(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Z)Z

    :goto_0
    const/4 v0, 0x2

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->s(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)I

    move-result v1

    if-ne v0, v1, :cond_1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "@"

    invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->t(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "@"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    const-string/jumbo v2, "@"

    invoke-virtual {v1, v2}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    const-string/jumbo v3, "@"

    invoke-virtual {v2, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/g;->b(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const-class v2, Lcom/waiqin365/lightapp/im/contactlist/AtActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "groupId"

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->j(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const/16 v2, 0x1b

    invoke-virtual {v1, v0, v2}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->startActivityForResult(Landroid/content/Intent;I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const v1, 0x7f040022

    const v2, 0x7f040021

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->overridePendingTransition(II)V

    :cond_1
    return-void

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->e(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Z)Z

    goto/16 :goto_0
.end method

.method public beforeTextChanged(Ljava/lang/CharSequence;III)V
    .locals 2

    if-lez p4, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->d(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Z)Z

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->d(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Z)Z

    goto :goto_0
.end method

.method public onTextChanged(Ljava/lang/CharSequence;III)V
    .locals 3

    const/16 v2, 0x8

    const/4 v1, 0x0

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->q(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Landroid/widget/Button;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->r(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->q(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Landroid/widget/Button;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/t;->a:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->r(Lcom/waiqin365/lightapp/im/activity/ChatActivity;)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0
.end method
